package com.nowcoder.code.hjnc;

public class NC1 {


    public String solve(String s, String t) {

        char[] ss = s.toCharArray();
        char[] st = t.toCharArray();

        if (ss.length < st.length) {
            char[] tmp = ss;
            ss = st;
            st = tmp;
        }

        int h = 0;
        for (int i = ss.length - 1, j = st.length - 1; i >= 0; i--, j--) {
            int si = ss[i] - 48;

            int ti = j >= 0 ? st[j] - 48 : 0;
            int sum = si + ti + h;
            h = sum / 10;
            sum = sum % 10;
            ss[i] = (char) (sum + 48);
        }
        String res = new String(ss);
        if (h != 0) {
            res = h + res;
        }

        return res;
    }

    public static void main(String[] args) {
        Integer i1 = 10023233;
        Integer i2 = 233411134;
        System.out.println(i1 + i2);
        System.out.println(new NC1().solve(i1.toString(), i2.toString()));

    }
}
